package net.maku.kyy.dao;


import net.maku.framework.mybatis.dao.BaseDao;
import net.maku.kyy.entity.KyyUserGameEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 用户的游戏表
 *
 * @author MAKU babamu@126.com
 * <a href="https://maku.net">MAKU</a>
 */
@Mapper
public interface KyyUserGameDao extends BaseDao<KyyUserGameEntity> {

    //根据用户id获取所有游戏id
    @Select("select kyy_game_id from kyy_user_game where creator = #{userId}")
    List<Long> getGameIdsByUserId(Long userId);
}